#include <iostream>

using namespace std;

void zhao(int n, int k);

int main(void)
{
	int n, k;

	cout << "n: ";
	cin >> n;
	cout << "k: ";
	cin >> k;

	zhao(n, k);

	return 0;
}

void zhao(int n, int k)
{
	int i, j;
	int a[n];
	int t;
	for(i = 0; i < n; i ++)
	{
		cout << "number" << i + 1 << ": ";
		cin >> a[i];
	}

	for(i = 0; i < n; i ++)
	{
		for(j = i + 1; j < n; j ++)
		{
			if(a[i] > a[j])
			{
				t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
		}
	}
	for(i = 0; i < k; i ++)
	{
		cout << "numberk" << i + 1 << ": " << a[i] << endl;
	}
}
